//Copyright 2010 Balazs Keri, Imre Keri
//
//This file is part of FireworksCreator.
//
//FireworksCreator is free software: you can redistribute it and/or modify
//it under the terms of the GNU General Public License as published by
//the Free Software Foundation, either version 3 of the License, or
//(at your option) any later version.
//
//FireworksCreator is distributed in the hope that it will be useful,
//but WITHOUT ANY WARRANTY; without even the implied warranty of
//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//GNU General Public License for more details.
//
//You should have received a copy of the GNU General Public License
//along with FireworksCreator.  If not, see <http://www.gnu.org/licenses/>.
//
#include "shooter.h"
#include "particleshooter.h"
#include "controller.h"
#include <model/shooter.h>
#include <model/particleshooter.h>
//
namespace player
{
Shooter *Shooter::create(model::Shooter *p_shooter)
{
   if(p_shooter->inherits("model::ParticleShooter"))
      return new ParticleShooter();
   //
   Q_ASSERT(false);
   return 0;
}
Shooter::~Shooter()
{
   qDebug()<<"Player::Shooter::~Shooter";
}
void Shooter::init_setup(Controller *p_controller,const model::Shooter * /*p_shooter*/)
{
   Q_ASSERT(!controller);
   controller=p_controller;
}
Shooter::Shooter()
:
   controller(0)
{
}
//
double Shooter::get_start_time()const
{
   return get_shooter()->get_start_time();
}
}
